<template>
    <el-col :span="12" v-show="image">
        <el-image :src="image" v-image-preview
                    style="width: 100px;height: 60px"></el-image>
    </el-col>
</template>

<script>
    import {showPictureByidUrl} from "@/config/api";

    export default {
 name: "imgView",
 props: {
    /* 父组件传过来的数据 */
    item: {
      type: Object
    }
  },
  data() {
    return {
        image:""
    }
  },
  created() {
    this.showPicture();
  },
   methods: {
       showPicture(){
        showPictureByidUrl({
            raid: this.item.UP_ID,
            rnucode:"selfimg",
            project:localStorage.getItem("project_id")
        }).then(res1 => {
            if(res1.data.data.length>0){
                this.image =  res1.data.data[0].image;
            }
        });
       }
   }
}
</script>

<style>

</style>